package com.esyoga.yoyoga.pojo;

import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
public class TReviewExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public TReviewExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andRIdIsNull() {
            addCriterion("r_id is null");
            return (Criteria) this;
        }

        public Criteria andRIdIsNotNull() {
            addCriterion("r_id is not null");
            return (Criteria) this;
        }

        public Criteria andRIdEqualTo(Integer value) {
            addCriterion("r_id =", value, "rId");
            return (Criteria) this;
        }

        public Criteria andRIdNotEqualTo(Integer value) {
            addCriterion("r_id <>", value, "rId");
            return (Criteria) this;
        }

        public Criteria andRIdGreaterThan(Integer value) {
            addCriterion("r_id >", value, "rId");
            return (Criteria) this;
        }

        public Criteria andRIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("r_id >=", value, "rId");
            return (Criteria) this;
        }

        public Criteria andRIdLessThan(Integer value) {
            addCriterion("r_id <", value, "rId");
            return (Criteria) this;
        }

        public Criteria andRIdLessThanOrEqualTo(Integer value) {
            addCriterion("r_id <=", value, "rId");
            return (Criteria) this;
        }

        public Criteria andRIdIn(List<Integer> values) {
            addCriterion("r_id in", values, "rId");
            return (Criteria) this;
        }

        public Criteria andRIdNotIn(List<Integer> values) {
            addCriterion("r_id not in", values, "rId");
            return (Criteria) this;
        }

        public Criteria andRIdBetween(Integer value1, Integer value2) {
            addCriterion("r_id between", value1, value2, "rId");
            return (Criteria) this;
        }

        public Criteria andRIdNotBetween(Integer value1, Integer value2) {
            addCriterion("r_id not between", value1, value2, "rId");
            return (Criteria) this;
        }

        public Criteria andRUseridIsNull() {
            addCriterion("r_userid is null");
            return (Criteria) this;
        }

        public Criteria andRUseridIsNotNull() {
            addCriterion("r_userid is not null");
            return (Criteria) this;
        }

        public Criteria andRUseridEqualTo(Integer value) {
            addCriterion("r_userid =", value, "rUserid");
            return (Criteria) this;
        }

        public Criteria andRUseridNotEqualTo(Integer value) {
            addCriterion("r_userid <>", value, "rUserid");
            return (Criteria) this;
        }

        public Criteria andRUseridGreaterThan(Integer value) {
            addCriterion("r_userid >", value, "rUserid");
            return (Criteria) this;
        }

        public Criteria andRUseridGreaterThanOrEqualTo(Integer value) {
            addCriterion("r_userid >=", value, "rUserid");
            return (Criteria) this;
        }

        public Criteria andRUseridLessThan(Integer value) {
            addCriterion("r_userid <", value, "rUserid");
            return (Criteria) this;
        }

        public Criteria andRUseridLessThanOrEqualTo(Integer value) {
            addCriterion("r_userid <=", value, "rUserid");
            return (Criteria) this;
        }

        public Criteria andRUseridIn(List<Integer> values) {
            addCriterion("r_userid in", values, "rUserid");
            return (Criteria) this;
        }

        public Criteria andRUseridNotIn(List<Integer> values) {
            addCriterion("r_userid not in", values, "rUserid");
            return (Criteria) this;
        }

        public Criteria andRUseridBetween(Integer value1, Integer value2) {
            addCriterion("r_userid between", value1, value2, "rUserid");
            return (Criteria) this;
        }

        public Criteria andRUseridNotBetween(Integer value1, Integer value2) {
            addCriterion("r_userid not between", value1, value2, "rUserid");
            return (Criteria) this;
        }

        public Criteria andRUsertypeIsNull() {
            addCriterion("r_usertype is null");
            return (Criteria) this;
        }

        public Criteria andRUsertypeIsNotNull() {
            addCriterion("r_usertype is not null");
            return (Criteria) this;
        }

        public Criteria andRUsertypeEqualTo(Integer value) {
            addCriterion("r_usertype =", value, "rUsertype");
            return (Criteria) this;
        }

        public Criteria andRUsertypeNotEqualTo(Integer value) {
            addCriterion("r_usertype <>", value, "rUsertype");
            return (Criteria) this;
        }

        public Criteria andRUsertypeGreaterThan(Integer value) {
            addCriterion("r_usertype >", value, "rUsertype");
            return (Criteria) this;
        }

        public Criteria andRUsertypeGreaterThanOrEqualTo(Integer value) {
            addCriterion("r_usertype >=", value, "rUsertype");
            return (Criteria) this;
        }

        public Criteria andRUsertypeLessThan(Integer value) {
            addCriterion("r_usertype <", value, "rUsertype");
            return (Criteria) this;
        }

        public Criteria andRUsertypeLessThanOrEqualTo(Integer value) {
            addCriterion("r_usertype <=", value, "rUsertype");
            return (Criteria) this;
        }

        public Criteria andRUsertypeIn(List<Integer> values) {
            addCriterion("r_usertype in", values, "rUsertype");
            return (Criteria) this;
        }

        public Criteria andRUsertypeNotIn(List<Integer> values) {
            addCriterion("r_usertype not in", values, "rUsertype");
            return (Criteria) this;
        }

        public Criteria andRUsertypeBetween(Integer value1, Integer value2) {
            addCriterion("r_usertype between", value1, value2, "rUsertype");
            return (Criteria) this;
        }

        public Criteria andRUsertypeNotBetween(Integer value1, Integer value2) {
            addCriterion("r_usertype not between", value1, value2, "rUsertype");
            return (Criteria) this;
        }

        public Criteria andRMIdIsNull() {
            addCriterion("r_m_id is null");
            return (Criteria) this;
        }

        public Criteria andRMIdIsNotNull() {
            addCriterion("r_m_id is not null");
            return (Criteria) this;
        }

        public Criteria andRMIdEqualTo(Integer value) {
            addCriterion("r_m_id =", value, "rMId");
            return (Criteria) this;
        }

        public Criteria andRMIdNotEqualTo(Integer value) {
            addCriterion("r_m_id <>", value, "rMId");
            return (Criteria) this;
        }

        public Criteria andRMIdGreaterThan(Integer value) {
            addCriterion("r_m_id >", value, "rMId");
            return (Criteria) this;
        }

        public Criteria andRMIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("r_m_id >=", value, "rMId");
            return (Criteria) this;
        }

        public Criteria andRMIdLessThan(Integer value) {
            addCriterion("r_m_id <", value, "rMId");
            return (Criteria) this;
        }

        public Criteria andRMIdLessThanOrEqualTo(Integer value) {
            addCriterion("r_m_id <=", value, "rMId");
            return (Criteria) this;
        }

        public Criteria andRMIdIn(List<Integer> values) {
            addCriterion("r_m_id in", values, "rMId");
            return (Criteria) this;
        }

        public Criteria andRMIdNotIn(List<Integer> values) {
            addCriterion("r_m_id not in", values, "rMId");
            return (Criteria) this;
        }

        public Criteria andRMIdBetween(Integer value1, Integer value2) {
            addCriterion("r_m_id between", value1, value2, "rMId");
            return (Criteria) this;
        }

        public Criteria andRMIdNotBetween(Integer value1, Integer value2) {
            addCriterion("r_m_id not between", value1, value2, "rMId");
            return (Criteria) this;
        }

        public Criteria andRTextIsNull() {
            addCriterion("r_text is null");
            return (Criteria) this;
        }

        public Criteria andRTextIsNotNull() {
            addCriterion("r_text is not null");
            return (Criteria) this;
        }

        public Criteria andRTextEqualTo(String value) {
            addCriterion("r_text =", value, "rText");
            return (Criteria) this;
        }

        public Criteria andRTextNotEqualTo(String value) {
            addCriterion("r_text <>", value, "rText");
            return (Criteria) this;
        }

        public Criteria andRTextGreaterThan(String value) {
            addCriterion("r_text >", value, "rText");
            return (Criteria) this;
        }

        public Criteria andRTextGreaterThanOrEqualTo(String value) {
            addCriterion("r_text >=", value, "rText");
            return (Criteria) this;
        }

        public Criteria andRTextLessThan(String value) {
            addCriterion("r_text <", value, "rText");
            return (Criteria) this;
        }

        public Criteria andRTextLessThanOrEqualTo(String value) {
            addCriterion("r_text <=", value, "rText");
            return (Criteria) this;
        }

        public Criteria andRTextLike(String value) {
            addCriterion("r_text like", value, "rText");
            return (Criteria) this;
        }

        public Criteria andRTextNotLike(String value) {
            addCriterion("r_text not like", value, "rText");
            return (Criteria) this;
        }

        public Criteria andRTextIn(List<String> values) {
            addCriterion("r_text in", values, "rText");
            return (Criteria) this;
        }

        public Criteria andRTextNotIn(List<String> values) {
            addCriterion("r_text not in", values, "rText");
            return (Criteria) this;
        }

        public Criteria andRTextBetween(String value1, String value2) {
            addCriterion("r_text between", value1, value2, "rText");
            return (Criteria) this;
        }

        public Criteria andRTextNotBetween(String value1, String value2) {
            addCriterion("r_text not between", value1, value2, "rText");
            return (Criteria) this;
        }

        public Criteria andRFlagIsNull() {
            addCriterion("r_flag is null");
            return (Criteria) this;
        }

        public Criteria andRFlagIsNotNull() {
            addCriterion("r_flag is not null");
            return (Criteria) this;
        }

        public Criteria andRFlagEqualTo(Integer value) {
            addCriterion("r_flag =", value, "rFlag");
            return (Criteria) this;
        }

        public Criteria andRFlagNotEqualTo(Integer value) {
            addCriterion("r_flag <>", value, "rFlag");
            return (Criteria) this;
        }

        public Criteria andRFlagGreaterThan(Integer value) {
            addCriterion("r_flag >", value, "rFlag");
            return (Criteria) this;
        }

        public Criteria andRFlagGreaterThanOrEqualTo(Integer value) {
            addCriterion("r_flag >=", value, "rFlag");
            return (Criteria) this;
        }

        public Criteria andRFlagLessThan(Integer value) {
            addCriterion("r_flag <", value, "rFlag");
            return (Criteria) this;
        }

        public Criteria andRFlagLessThanOrEqualTo(Integer value) {
            addCriterion("r_flag <=", value, "rFlag");
            return (Criteria) this;
        }

        public Criteria andRFlagIn(List<Integer> values) {
            addCriterion("r_flag in", values, "rFlag");
            return (Criteria) this;
        }

        public Criteria andRFlagNotIn(List<Integer> values) {
            addCriterion("r_flag not in", values, "rFlag");
            return (Criteria) this;
        }

        public Criteria andRFlagBetween(Integer value1, Integer value2) {
            addCriterion("r_flag between", value1, value2, "rFlag");
            return (Criteria) this;
        }

        public Criteria andRFlagNotBetween(Integer value1, Integer value2) {
            addCriterion("r_flag not between", value1, value2, "rFlag");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}